package cn.com.rexen.rplus.security;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

/**
 * 系统主要的配置文件.随服务进行启动.
 * Created by libo on 2014/5/5.
 */
public class PlusServlet extends HttpServlet {

    private Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
        String contextPath = config.getServletContext().getContextPath();

        logger.debug("contextPath:{}", contextPath);

        getServletContext().setAttribute("contextPath", contextPath);
//        getServletContext().setAttribute("resourcesPath", StringUtils.connect(contextPath, "/", RESOURCE_PATH));

    }
}
